using System;
using System.Collections.Generic;
using System.Text;

using Geekees.App.HRAssistant.DataInterface.Common;

namespace Geekees.App.HRAssistant.BOL.Common
{
	public abstract class AbstractBo<T, IdT> : IBo
	{
		protected IDao<T, IdT> _dao;

		protected AbstractBo( IDao<T, IdT> dao )
		{
			this._dao = ( IDao<T, IdT> )dao;
		}

		public T GetById( IdT id, bool shouldLock )
		{
			return _dao.GetById( id, shouldLock );
		}

		public T Save( T entity )
		{
			return _dao.Save( entity );
		}

		/*
		public IList<T> Search( int startRow, int maxRows, string[] asc, string[] desc )
		{
			return _dao.Search( maxRows, startRow, asc, desc );
		}*/

		#region IBo Members

		public abstract void SetDao( IFactoryManager factoryManager );

		#endregion
	}
}
